﻿@model Mvc.Models.TipoProyecto

@{
    var options = new AjaxOptions()
                      {
                          Url = Url.Action("Create", "TipoProyecto"),
                          LoadingElementId = "",
                          UpdateTargetId = "content",
                          InsertionMode = InsertionMode.Replace, // <-- Replace the content of DOM element
                          HttpMethod = "POST",


                      };  
}


<h2>Adicionar</h2>

@using (Ajax.BeginForm(options))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>


        <div class="editor-label">
            @Html.LabelFor(model => model.Nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombre)
            @Html.ValidationMessageFor(model => model.Nombre)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
